<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!--Begin Header Begin-->
<div class="soubg">
	<div class="sou">
    	<!--Begin 所在收货地区 Begin-->
    	<span class="s_city_b">
        	<span class="fl">送货至：</span>
            <span class="s_city">
            	<span>四川</span>
                <div class="s_city_bg">
                	<div class="s_city_t"></div>
                    <div class="s_city_c">
                    	<h2>请选择所在的收货地区</h2>
                        <table border="0" class="c_tab" style="width:235px; margin-top:10px;" cellspacing="0" cellpadding="0">
                          <tr>
                            <th>A</th>
                            <td class="c_h"><span>安徽</span><span>澳门</span></td>
                          </tr>
                          <tr>
                            <th>B</th>
                            <td class="c_h"><span>北京</span></td>
                          </tr>
                          <tr>
                            <th>C</th>
                            <td class="c_h"><span>重庆</span></td>
                          </tr>
                          <tr>
                            <th>F</th>
                            <td class="c_h"><span>福建</span></td>
                          </tr>
                          <tr>
                            <th>G</th>
                            <td class="c_h"><span>广东</span><span>广西</span><span>贵州</span><span>甘肃</span></td>
                          </tr>
                          <tr>
                            <th>H</th>
                            <td class="c_h"><span>河北</span><span>河南</span><span>黑龙江</span><span>海南</span><span>湖北</span><span>湖南</span></td>
                          </tr>
                          <tr>
                            <th>J</th>
                            <td class="c_h"><span>江苏</span><span>吉林</span><span>江西</span></td>
                          </tr>
                          <tr>
                            <th>L</th>
                            <td class="c_h"><span>辽宁</span></td>
                          </tr>
                          <tr>
                            <th>N</th>
                            <td class="c_h"><span>内蒙古</span><span>宁夏</span></td>
                          </tr>
                          <tr>
                            <th>Q</th>
                            <td class="c_h"><span>青海</span></td>
                          </tr>
                          <tr>
                            <th>S</th>
                            <td class="c_h"><span>上海</span><span>山东</span><span>山西</span><span class="c_check">四川</span><span>陕西</span></td>
                          </tr>
                          <tr>
                            <th>T</th>
                            <td class="c_h"><span>台湾</span><span>天津</span></td>
                          </tr>
                          <tr>
                            <th>X</th>
                            <td class="c_h"><span>西藏</span><span>香港</span><span>新疆</span></td>
                          </tr>
                          <tr>
                            <th>Y</th>
                            <td class="c_h"><span>云南</span></td>
                          </tr>
                          <tr>
                            <th>Z</th>
                            <td class="c_h"><span>浙江</span></td>
                          </tr>
                        </table>
                    </div>
                </div>
            </span>
        </span>
        <!--End 所在收货地区 End-->
        <span class="fr">
        	<span class="fl">你好，
	        	<c:if test="${empty user }">
	        	请<a href="login.jsp">登录</a>&nbsp; <a href="regist.jsp" style="color:#ff4e00;">免费注册</a>&nbsp;
				<a href="loginByCode.html" style="color:#ff4e00;">验证码登录</a>&nbsp;<a href="#" style="color:#ff4e00;">微信登录</a>&nbsp;
	        	</c:if>
	
	        	<c:if test="${!empty user }">
	        	<a href="member_user.jsp"><font color="red" title="点击进入会员中心">${user.nickName }</font></a>
	        	|<a href="BaseOrderServlet?method=findOrderByUserId">我的订单</a>&nbsp;|<a href="#">后台管理</a>&nbsp;|<a href="UserServlet?method=logout">注销</a>
				</c:if>
	        </span>
        </span>
    </div>
</div>
<div class="m_top_bg">
    <div class="top">
        <div class="m_logo"><a href="index.jsp"><img src="images/logo2.png" /></a></div>

<div class="i_car">
    	<c:if test="${empty user }">
    		<div class="car_t">购物车 [ <span>0</span> ]</div>
    	</c:if>
    	<c:if test="${!empty user }">
    		<div class="car_t">购物车 [ <span>${totalNum }</span> ]</div>
    	</c:if>
        <div class="car_bg">
       		<!--Begin 购物车未登录 Begin-->
       		<c:if test="${empty user }">
       			<div class="un_login">还未登录！<a href="login.jsp" style="color:#ff4e00;">马上登录</a> 查看购物车！</div>
       		</c:if>
            <!--End 购物车未登录 End-->
            <!--Begin 购物车已登录 Begin-->
            <ul class="cars">
            	<c:forEach items="${cartList }" var="cart">
	            	<li>
	                	<div class="img"><a href="GoodsServlet?method=findOne&id=${cart.goodsId }"><img src="images/${cart.fileName }" width="58" height="58" /></a></div>
	                    <div class="name"><a href="GoodsServlet?method=findOne&id=${cart.goodsId }">${cart.goodsName }</a></div>
	                    <div class="price"><font color="#ff4e00">￥${cart.price }</font> X${cart.num }</div>
	                </li>
            	</c:forEach>
            </ul>
            <c:if test="${!empty user }">
            	<div class="price_sum">共计&nbsp; <font color="#ff4e00">￥</font><span>${totalMoney }</span></div>
            	<div class="price_a"><a href="buycar.jsp">去购物车结算</a></div>
            </c:if>
            <!--End 购物车已登录 End-->
        </div>
    </div>
    </div>
</div>
<!--End Header End--> 